Category: Programming

1

CSMA Implementation in Java

This is the CSMA Implementation in java Carrier sense multiple access (CSMA) is a probabilistic media access control (MAC) protocol in which a node verifies the absence of other traffic before transmitting on a...

0

Lex Program to Identify Tokens

This is the Lex Program to identify tokens in a program using regular expressions [cc lang=”c”] %{ #include %} %% bool|int|float printf(“Keyword”); [-,+]?[0-9]+ printf(“Constants”); [,.’”]+ printf(“Punctuation Chars”); [!@#$%^&*()]+ printf(“Special Chars”); [a-zA-Z]+ printf(“Identifiers”); %% main(){yylex();}...