虫虫首页|资源下载|资源专辑|精品软件
登录|注册

begin

  • 语法分析 C2.1 实验目的 编制一个递归下降分析程序,实现对词法分析程序所提供的单词序列的语法检查和结构分析. C2.2 实验要求 利用C语言编制递归下降分析程序,并对简单语言进行语法分析.

    语法分析 C2.1 实验目的 编制一个递归下降分析程序,实现对词法分析程序所提供的单词序列的语法检查和结构分析. C2.2 实验要求 利用C语言编制递归下降分析程序,并对简单语言进行语法分析. C2.2.1待分析的简单语言的语法 用扩充的BNF表示如下: (1)<程序>::=begin<语句串>end (2)<语句串>::=<语句>{ <语句>} (3)<语句>::=<赋值语句> (4)<赋值语句>::=ID:=<表达式> (5)<表达式>::=<项>{+<项> | —项>} (6)<项>::=<因子>{*<因子> | /<因子>} (7)<因子>::=ID | NUM | (<表达式>) C2。2。2实验要求说明 输入单词串,以“#”结束,如果是文法正确的句子,则输出成功信息,打印“success”,否则输出“error”.

    标签: 程序 2.1 2.2

    上传时间: 2014-09-05

    上传用户:caiiicc

  • 实验目的 通过上机实习,加深对语法制导翻译原理的理解,掌握将语法分析所识别的语法成分变换为中间代码的语义翻译方法. 实验要求 采用递归下降语法制导翻译法,对算术表达式、赋值语句进行语义分析并生成

    实验目的 通过上机实习,加深对语法制导翻译原理的理解,掌握将语法分析所识别的语法成分变换为中间代码的语义翻译方法. 实验要求 采用递归下降语法制导翻译法,对算术表达式、赋值语句进行语义分析并生成四元式序列。 实验的输入和输出 输入是语法分析提供的正确的单词串,输出为三地址指令形式的四元式序列。 例如:对于语句串 begin a:=2+3*4 x:=(a+b)/c end# 输出的三地址指令如下: (1) t1=3*4 (2) t2=2+t1 (3) a=t2 (4) t3=a+b (5) t4=t3/c (6) x=t4

    标签: 翻译 实验 制导

    上传时间: 2017-09-27

    上传用户:hjshhyy

  • msp430

    msp430The LDC1312 and LDC1314 are 2- and 4-channel, 1• Easy-to-use – minimal configuration required 12-bit inductance to digital converters (LDCs) for • Measure up to 4 sensors with one IC inductive sensing solutions. With multiple channels • Multiple channels support environmental and and support for remote sensing, the LDC1312 and aging compensation LDC1314 enable the performance and reliability benefits of inductive sensing to be realized at minimal• Multi-channel remote sensing provides lowest cost and power. The products are easy to use, onlysystem cost requiring that the sensor frequency be within 1 kHz • Pin-compatible medium and high-resolution and 10 MHz to begin sensing. The wide 1 kHz to 10 options MHz sensor frequency range also enables use of very small PCB coils, further reducing sensing– LDC1312/4: 2/4-ch 12-bit LDC solution cost and size.– LDC1612/4: 2/4-ch 28

    标签: msp 430

    上传时间: 2016-07-22

    上传用户:tongmoonsky

  • PL0语言设计一个词法分析器

    PL0语言是与pascal类似的语言,但是比pascal语言的词法、语法更加严格苛刻。 在PL0语言中,只有五种类型的单词:关键字、用户自定义标识符、数字、特殊符号以及非法标识符。 根据题目给出的PL0的文法,关键字只有如下几个: Const——用来声明常量; Var——用来声明变量; Procedure——用来声明过程; begin——声明过程的开始; End——声明过程的结束; Ood——单目运算符,声明为关键字; If——条件语句; Then——条件语句; Call——声明调用函数; While——循环语句; Read——读文件语句; Write——写文件语句; 对于用户自定义标识符应该满足:以字母开头,其后是字母和数字的组合,即:字母(字母|数字)* 数字则是数字字符(0——9)组成的数字串; 特殊符号有如下几个: +,-,*,/,=<>,<,>=,<=,:= 把关键字、算符和界符称为语言固有的单词,标识符、常量称为用户自定义的单词。 为此设置三个全程量:SYM,ID,NUM。 SYM:存放每个单词的类别,为内部编码的表示形式; ID:存放用户所定义的标识符的值,即标识符字符串的机内表示; NUM:存放用户定义的数。

    标签: PL0 语言 分析器

    上传时间: 2017-06-20

    上传用户:lbxxx

  • RFID_-_A_Guide_to_Radio_Frequency_IDentification

    Radio frequency identifi cation (RFID) technology is a wireless communication technology that enables users to uniquely identify tagged objects or people. RFID is rapidly becoming a cost-effective technology. This is in large part due to the efforts of Wal-Mart and the Department of Defense (DoD) to incorporate RFID technology into their supply chains. In 2003, with the aim of enabling pallet-level tracking of inventory, Wal-Mart issued an RFID mandate requiring its top suppliers to begin tagging pallets and cases, with Electronic Product Code (EPC) labels. The DoD quickly followed suit and issued the same mandate to its top 100 suppliers. This drive to incorporate RFID technology into their supply chains is motivated by the increased ship- ping, receiving and stocking effi ciency and the decreased costs of labor, storage, and product loss that pallet-level visibility of inventory can offer.

    标签: A_Guide_to_Radio_Frequency_IDenti fication RFID

    上传时间: 2020-06-08

    上传用户:shancjb

  • DDR3 layout指导

    This document provides general hardware and layoutconsiderations and guidelines for hardware engineersimplementing a DDR3 memory subsystem.The rules and recommendations in this document serve as aninitial baseline for board designers to begin their specificimplementations, such as fly-by memory topology.

    标签: ddr3

    上传时间: 2021-11-20

    上传用户:ooaaooxx

  • FPGA片内FIFO读写测试Verilog逻辑源码Quartus工程文件+文档说明 使用 FPGA

    FPGA片内FIFO读写测试Verilog逻辑源码Quartus工程文件+文档说明,使用 FPGA 内部的 FIFO 以及程序对该 FIFO 的数据读写操作。FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。timescale 1ns / 1ps//////////////////////////////////////////////////////////////////////////////////module fifo_test( input clk,           //50MHz时钟 input rst_n              //复位信号,低电平有效 );//-----------------------------------------------------------localparam      W_IDLE      = 1;localparam      W_FIFO     = 2; localparam      R_IDLE      = 1;localparam      R_FIFO     = 2; reg[2:0]  write_state;reg[2:0]  next_write_state;reg[2:0]  read_state;reg[2:0]  next_read_state;reg[15:0] w_data;    //FIFO写数据wire      wr_en;    //FIFO写使能wire      rd_en;    //FIFO读使能wire[15:0] r_data; //FIFO读数据wire       full;  //FIFO满信号 wire       empty;  //FIFO空信号 wire[8:0]  rd_data_count;  wire[8:0]  wr_data_count;  ///产生FIFO写入的数据always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) write_state <= W_IDLE; else write_state <= next_write_state;endalways@(*)begin case(write_state) W_IDLE: if(empty == 1'b1)               //FIFO空, 开始写FIFO next_write_state <= W_FIFO; else next_write_state <= W_IDLE; W_FIFO: if(full == 1'b1)                //FIFO满 next_write_state <= W_IDLE; else next_write_state <= W_FIFO; default: next_write_state <= W_IDLE; endcaseendassign wr_en = (next_write_state == W_FIFO) ? 1'b1 : 1'b0; always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) w_data <= 16'd0; else    if (wr_en == 1'b1)     w_data <= w_data + 1'b1; else          w_data <= 16'd0; end///产生FIFO读的数据always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) read_state <= R_IDLE; else read_state <= next_read_state;endalways@(*)begin case(read_state) R_IDLE: if(full == 1'b1)               //FIFO满, 开始读FIFO next_read_state <= R_FIFO; else next_read_state <= R_IDLE; R_FIFO: if(empty == 1'b1)   

    标签: fpga fifo verilog quartus

    上传时间: 2021-12-18

    上传用户:20125101110

  • arduino电子秤程序

    HX711_1Kg#include "HX711.h"float Weight = 0;void setup(){ Init_Hx711(); //初始化HX711模块连接的IO设置 Serial.begin(9600); Serial.print("Welcome to use!\n"); delay(3000); Get_Maopi(); //获取毛皮}void loop(){ Weight = Get_Weight(); //计算放在传感器上的重物重量 Serial.print(float(Weight/1000),3); //串口显示重量 Serial.print(" kg\n"); //显示单位 Serial.print("\n"); //显示单位 delay(1000); //延时1s}

    标签: arduino 电子秤

    上传时间: 2022-03-19

    上传用户:2431247090

  • cadenceallegro16.6入门学习参考步骤

    一、建焊盘打开建立焊盘的软件Pad Designer路径:包括采用的制式,现在选公制单位毫米,精度3,右侧问是否需要多重钻孔,这个功能一般是用于做非圆孔。一般圆孔不用勾选。下面设定钻孔样式,一般是圆孔,钻孔内部是否镀铜 plated(no plated即为不镀铜,一般用于塑胶件定位孔),再是钻孔直径,设置精度,是否偏移等。如果是表贴元件,钻孔直径设为0。如果是表面安装元件,把signle layer mode勾选。焊盘一般需要 begin layer和end layer,还有就是soldmask_top,soldmask_bottom,pastemask top,pastemask bottom这几个层面。对表面安装元件来说,只需要begin layer,soldermask_top以及pastemask_top就可以了。鼠标左键点击begin layer,会发现最下面三个对话框被刷新,在下面填入需要的值:从左到右:规则焊盘,热焊盘,反焊盘。1规则焊盘下面需要填入焊盘形状,长宽,是否有偏移。1热焊盘,要求选择焊盘类型,尺寸等;1反焊盘,作用是设定焊盘与周边间距,一般比规则焊盘略大6-10mil。鼠标点击soldermask_top,下面对话框刷新出该选项。按照需要填入数据。Pastemask top同样处理。右边上角还有视图角度选择,Xsection为水平视图,TOP为从上往下看。

    标签: cadence allegro

    上传时间: 2022-07-01

    上传用户:XuVshu